//
//  OpenCV.h
//  CWDevelop
//
//  Created by LittoCats on 7/7/14.
//  Copyright (c) 2014 Littocats. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <opencv2/opencv.hpp>

typedef cv::Mat CVImage;

@interface OpenCV : NSObject

/**
 *  UIImage 转换
 */
+ (CVImage)cvMatFromUIImage:(UIImage *)image;

+ (CVImage)cvMatGrayFromUIImage:(UIImage *)image;

+ (UIImage *)UIImageFromCVMat:(CVImage)cvMat;
@end

CVImage cvMatCreateWithCGImage(CGImageRef image);
CVImage cvMatGrayCreateWithCGImage(CGImageRef image);
CGImageRef CGImageCreateWithCVMat(CVImage cvMat);